<?php
$con = mysql_connect("localhost","root","root");
		if (!$con)
  		{
 		 die('Could not connect: ' . mysql_error());
 		 }
		mysql_select_db("mydb", $con);
		mysql_query("set character set 'utf8'");//读库 
		mysql_query("set names 'utf8'");//写库
?>